<template>
	<div class="app">
		<h2>我是App组件</h2>
		<h3 v-show="ming">儿子给我的学校名：{{ming}}</h3>
		<School :getSchoolName="getSchoolName"/>
	</div>
</template>

<script>
	import School from './components/School'

	export default {
		name:'App',
		components:{School},
		data() {
			return {
				ming:''
			}
		},
		methods: {
			getSchoolName(name){
				console.log('我是App，我收到了儿子给我的学校名',name)
				this.ming = name
			}
		},
	}
</script>

<style>
	.app{
		background-color: gray;
		padding: 20px;
	}
</style>